﻿using UnityEngine;
using System.Collections;

/// <summary>
/// 平台控制器
/// </summary>
public class PlatformController : MonoBehaviour
{
    protected IInput mInput;
    public static PlatformController Init(GameObject gameObj, IInput imputImpl)
    {
        PlatformController controller = null;
#if UNITY_STANDALONE_WIN
        controller = gameObj.AddComponent<MouseController>();
#elif UNITY_ANDROID
        controller = gameObj.AddComponent<TouchController>();
#endif
        controller.Init(imputImpl);
        return new PlatformController();
    }

    public virtual void Init(IInput imputImpl)
	{
        mInput = imputImpl;
    }
}
